#ifndef AER_APPLICATION_HPP_
#define AER_APPLICATION_HPP_

#include "../aerDefs.hpp"
#include "../aerTimer.hpp"

/*
#if   (AER_USED_WM == AER_SFML)
# include  "SFML/aerApplication.hpp"
#elif (AER_USED_WM == AER_SDL)
# include  "SDL/aerApplication.hpp"
#else
# error     incorrect value for macro AER_USED_WM  !
#endif
*/

namespace aer {

struct Display;
class Window;


/// ================================================
/// + Describes an Application layer [ uses SFML ] +
/// ================================================
class Application
{    
  protected:
    Window *m_Window; // SFML window
    Timer   m_timer; 
 
  private: 
    bool    m_bTerminated;
     
  
  public:
    Application();
    virtual ~Application();
    
    Window* createWindow( const Display &display, const char *title);//
    void handleEvents();//
    
    void run();
    void quit();
    
    virtual void resize(const U32 width, const U32 height) {}
    virtual void updateFrame() {}//
    virtual void drawFrame()   {}
    
  private:
    virtual void init() {}//
  
  private:
    DISALLOW_COPY_AND_ASSIGN(Application);
};

} // aer

#endif // AER_APPLICATION_HPP_
